using System;
using ImageLib.Data.Database;
using ImageLib.Data.Extension;
using ImageLib.Shell.Model;

namespace ImageLib.Shell.ViewModel
{
    public class ImageItem : CommandItem<Image>
    {
        /// <summary>
        /// Initializes a new instance of the ImageItem class.
        /// </summary>
        public ImageItem(Image item, Action<Image> clickAction)
            : base(item, clickAction)
        {
            
        }
                
        public string FullPath
        {
            get 
            {
                string dirPath = MainModel.GetDirPath(Item.Library.Path, Item.Path);
                if (dirPath == null) { return null; }

                return Item.GetFullPath(dirPath); 
            }
        }
        
    }
}
